<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>节点</title>
	<script type="text/javascript">
			window.onload = function  () {
				// son = document.getElementsByClassName("son");

				// son[0].parentNode.parentNode.style.backgroundColor = "green";
				 
				del = document.getElementsByClassName("del");

				for (var i = 0; i < del.length; i++) {
					fun(i);
				}

				function fun (x) {
					del[x].onclick = function  () {
						del[x].parentNode.parentNode.style.display='none';
					}
				}		
			}






	</script>
	<style type="text/css">
			.box{
				width: 500px;
				height: 500px;
				background: red;
			}
			.son{
				width: 300px;
				height: 300px;
				background: gray;
			}
	


	</style>
</head>
<body>
		<!-- <div class="box">
			
			<div class="son">
				儿子
			</div>
		</div> -->
		<table border="1" style="text-align:center">
			<tr>
				<td>姓名</td>
				<td>性别</td>
				<td>年龄</td>
				<td>操作</td>
			</tr>
			<tr>
				<td>1小黄</td>
				<td>15</td>
				<td>男</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>2小红</td>
				<td>17</td>
				<td>女</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>3小黄</td>
				<td>15</td>
				<td>男</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>4小红</td>
				<td>17</td>
				<td>女</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>5小黄</td>
				<td>15</td>
				<td>男</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>6小红</td>
				<td>17</td>
				<td>女</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>7小黄</td>
				<td>15</td>
				<td>男</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>8小红</td>
				<td>17</td>
				<td>女</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>9小黄</td>
				<td>15</td>
				<td>男</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
			<tr>
				<td>10小红</td>
				<td>17</td>
				<td>女</td>
				<td><input type="button" class="del" value="删除"><input type="button" value="修改"></td>
			</tr>
		</table>
</body>
</html>